/*
 * RenzoImage.cpp
 *
 *  Created on: Aug 30, 2009
 *      Author: sonhua
 */

#include "RenzoPrecompiled.h"
#include "RenzoImage.h"
#include "RenzoResourceManager.h"

namespace Renzo {
Image::Image() {

}

Object* Image::create() {
	return new Image;
}

void Image::initialize(void* _pixels, PixelFormat _fmt, Size _size, String _name) 
{
	pixels			= _pixels;
	pixelFormat		= _fmt;
	size	= _size;
	name	= _name;
	//resID = createResourceID();
}

Image::~Image() {
	rzFree(pixels);
}

/*
ResourceID Image::createResourceID() {
	return Renzoderer::instance()->getResourceManager()->genResourceID(RESOURCE_TYPE_IMAGE);
}*/

void* Image::getInternalData() const {
	return pixels;
}

Size Image::getSize() const {
	return size;
}

PixelFormat Image::getPixelFormat() const {
	return pixelFormat;
}

String Image::getName() const {
	return name;
}

}
